package com.company.project.demo.common.exception;


import com.base.common.enums.ErrorEnum;

/**
 * @Description 登录异常类
 * @Author zhongbo.yu
 * @Date 2021/12/28
 */
public class LoginException extends RuntimeException {
    private static final long serialVersionUID = -3812061084899240673L;
    private String code;

    public LoginException(String message, Throwable cause) {
        super(message, cause);
    }

    public LoginException(String message) {
        super(message);
    }

    public LoginException(String message, String code) {
        super(message);
        this.code = code;
    }

    public LoginException(ErrorEnum errorEnum) {
        super(errorEnum.getCodeMsg());
        this.code = errorEnum.getCode();
    }

    public LoginException(String message, String code, Throwable e) {
        super(message, e);
        this.code = code;
    }

}